import React, { useEffect } from 'react';

const Child = ({ event$ }) => {
    useEffect(() => {
        console.log('Child');
    }, []);
    event$.useSubscription((type, val) => {
        console.log(type, val);
    });
    return <div>child <button onClick={() => event$.emit('child')}>event$</button></div>;
};

export default Child;
